-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sound when pv enters alarm state #59
Conversation
527a781
to
c1a712a
Compare
to try feature: (note: beep will not play if you have "Terminal Bell" disabled in the terminal that launched slam (or possibly if other "system sounds" settings are disabled)) |
…pv, and pv's alarm is tripped
…ir color updated correctly when enabled/disabled
also add: -add option to use shorthand cmd line args -make annunciate checkbox say "Annunciate (disabled)" to avoid confusion when annunciate disabled from cmd line
…tate and should annunciate
5ab926e
to
6286bee
Compare
Also remove some un-needed annunciate-related test code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and like discussed can follow up with a choice of different sounds later if needed, thanks!
@@ -61,6 +61,7 @@ def __init__( | |||
topic: str, | |||
table_type: AlarmTableType, | |||
plot_slot: Callable, | |||
annunciate: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not currently used for tables but maybe could be useful in the future
parser.add_argument("--topics", help="Comma separated list of kafka alarm topics to listen to") | ||
parser.add_argument("-t", "--topics", help="Comma separated list of kafka alarm topics to listen to") | ||
parser.add_argument( | ||
"-b", | ||
"--bootstrap-servers", | ||
default="localhost:9092", | ||
help="Comma separated list of urls for one or more kafka boostrap servers", | ||
) | ||
parser.add_argument("--user-permissions", default="admin", help="One of read-only, operator, admin") | ||
parser.add_argument("--log", default="warning", help="Logging level. debug, info, warning, error, critical") | ||
parser.add_argument("-u", "--user-permissions", default="admin", help="One of read-only, operator, admin") | ||
parser.add_argument("-l", "--log", default="warning", help="Logging level. debug, info, warning, error, critical") | ||
parser.add_argument( | ||
"-a", "--annunciate", action="store_true", help="Enable beep from alarms that have annunciate setting enabled" | ||
) # default=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the easier command line options
use print ('\a') to produce cross-platform sound when any alarm enters active-alarm state
also add option for short-hand cmd line args (-a and --annunciate as options)